package net.wofly.sale.commodity.domain;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import net.wofly.right.domain.User;

/**
 * 商品信息表
 * @author lign
 * @version 1.0
 * @created 10-9月-2017 14:14:49
 */
@Data
@Entity
@Table(name = "sale_commodity_commodity")
@ApiModel(description = "商品信息实体")
public class Commodity {

	@Id
	private String commodityID;
	/**
	 * 品牌
	 */
	@ApiModelProperty(value = "品牌ID", required = true)
	private String brandID;
	/**
	 * 商品编码   长度：20
	 */
	@ApiModelProperty(value = "商品编码", required = true)
	private String commodityCode;
	/**
	 * 商品名称    长度：50
	 */
	@ApiModelProperty(value = "商品名称", required = true)
	private String commodityName;
	
	/**
	 * 商品名称拼音    长度：50
	 */
	@ApiModelProperty(value = "商品名称拼音", required = true)
	private String commodityNamePinYin;
	
	@ApiModelProperty(value = "商品类型ID", required = true)
	private String commodityTypeID;
	/**
	 * 商品详情页地址  长度：100
	 */
	@ApiModelProperty(value = "商品详情页地址", required = true)
	private String detailAddr;
	/**
	 * 商品条码 ISBN  长度：20
	 */
	@ApiModelProperty(value = "商品条码 ISB", required = true)
	private String isbn;
	private Long modifyDate;
	/**
	 * 商品中图  长度：100
	 */
	@ApiModelProperty(value = "商品中图", required = true)
	private String pic;
	/**
	 * 商品大图  长度：100
	 */
	@ApiModelProperty(value = "商品大图", required = true)
	private String picBig;
	/**
	 * 商品小图  长度：100
	 */
	@ApiModelProperty(value = "商品小图", required = true)
	private String picSmall;
	/**
	 * 官方指导价（价格以分为单位）
	 */
	@ApiModelProperty(value = "官方指导价（价格以分为单位）", required = true)
	private Double price;
	/**
	 * 产地  长度：20
	 */
	@ApiModelProperty(value = "产地", required = false)
	private String productionPlace;
	/**
	 * 有效状态  1为有效 0为无效s
	 */
	@ApiModelProperty(value = "有效状态  1为有效 0为无效", required = false)
	private Integer status = 1;
	
	/**
	 * 有效状态说明
	 */
	@Transient
	@ApiModelProperty(value = "有效状态说明 1为有效 0为无效", required = false)
	private String statusStr = "";
	
	/**
	 * 毛重  单位：g
	 */
	@ApiModelProperty(value = "毛重 单位：g", required = true)
	private Integer weight;
	/**
	 * 操作人员ID
	 * 长度：300
	 */
	@ApiModelProperty(value = "操作人员ID", required = true)
	private String optUserID;
	
	@Transient
	@ApiModelProperty(value = "操作人员用户信息", required = true)
	private String optUserName;
	
	/**
	 * 操作人员 用户信息
	 * 长度：300
	 */
	@Transient
	@ApiModelProperty(value = "操作人员用户信息", required = true)
	private User user ;
	
	/**
	 * 备注
	 * 长度：300
	 */
	@ApiModelProperty(value = "备注", required = true)
	private String remark;
	/**
	 * 餐饮中菜的口味
	 * 长度：20
	 */
	@ApiModelProperty(value = "餐饮中菜的口味", required = true)
	private String taste;
	/**
	 * 单位
	 * 长度：10
	 */
	@ApiModelProperty(value = "单位", required = true)
	private String unit;
	
	/**
	 * 容量
	 * 长度：10
	 */
	@ApiModelProperty(value = "容量", required = true)
	private String capacity;
	
	/**
	 * 规格
	 * 长度：10
	 */
	@ApiModelProperty(value = "规格", required = true)
	private String specification;
	
//	public CommodityParamIns m_CommodityParamIns;
	@Transient
	public List<CommodityChannel> commodityChannelList;

	@Transient
	public CommodityChannel commodityChannel;
	
	@Transient
	private Integer residueNum ;

	@Transient
	private Brand brand;

	/**
	 * 品牌图片列表
	 */
	@Transient
	private List<CommodityDetailImg> brandImgs;
	/**
	 * 商品图片列表
	 */
	@Transient
	private List<CommodityDetailImg> commodityImgs;
	/**
	 * 公司图片列表
	 */
	@Transient
	private List<CommodityDetailImg> companyImgs;
	
	@Transient
	public List<CommodityTerminal> commodityTerminalList;
	
	@Transient
	private String commodityTypeIDStr;
	
	@Transient
	private String maxCode;


	public Commodity(){

	}

}